import request from '@/utils/request'

export function getChannelList(query) {
  return request({
    url: '/messenger/channel/getList',
    method: 'post',
    data: query
  })
}

export function getChannelDetail(id) {
  return request({
    url: '/messenger/channel/getDetail',
    method: 'post',
    data:  id 
  })
}
export function changeChannelStatusByID(data) {
  return request({
    url: '/messenger/channel/change-status',
    method: 'post',
    data: data
  })
}

export function removeChannelByID(channelID) {
  return request({
    url: '/messenger/channel/remove',
    method: 'post',
    data: channelID
  })
}

export function saveChannel(data) {
  return request({
    url: '/messenger/channel/save',
    method: 'post',
    data
  })
}
